package com.ruoyi.spot.realtime.historykline.service.impl;

import java.util.List;

import com.ruoyi.spot.realtime.historykline.domain.VO.SpotHistoryklineRealtimeDataVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.spot.realtime.historykline.mapper.SpotHistoryklineRealtimeDataMapper;
import com.ruoyi.spot.realtime.historykline.domain.SpotHistoryklineRealtimeData;
import com.ruoyi.spot.realtime.historykline.service.ISpotHistoryklineRealtimeDataService;

/**
 * 实时获取历史K线Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-06
 */
@Service
public class SpotHistoryklineRealtimeDataServiceImpl implements ISpotHistoryklineRealtimeDataService 
{
    @Autowired
    private SpotHistoryklineRealtimeDataMapper spotHistoryklineRealtimeDataMapper;

    /**
     * 查询实时获取历史K线
     * 
     * @param id 实时获取历史K线主键
     * @return 实时获取历史K线
     */
    @Override
    public SpotHistoryklineRealtimeDataVO selectSpotHistoryklineRealtimeDataById(Integer id)
    {
        return spotHistoryklineRealtimeDataMapper.selectSpotHistoryklineRealtimeDataById(id);
    }

    /**
     * 查询实时获取历史K线列表
     * 
     * @param spotHistoryklineRealtimeData 实时获取历史K线
     * @return 实时获取历史K线
     */
    @Override
    public List<SpotHistoryklineRealtimeDataVO> selectSpotHistoryklineRealtimeDataList(SpotHistoryklineRealtimeDataVO spotHistoryklineRealtimeData)
    {
        return spotHistoryklineRealtimeDataMapper.selectSpotHistoryklineRealtimeDataList(spotHistoryklineRealtimeData);
    }

    /**
     * 新增实时获取历史K线
     * 
     * @param spotHistoryklineRealtimeData 实时获取历史K线
     * @return 结果
     */
    @Override
    public int insertSpotHistoryklineRealtimeData(SpotHistoryklineRealtimeData spotHistoryklineRealtimeData)
    {
        return spotHistoryklineRealtimeDataMapper.insertSpotHistoryklineRealtimeData(spotHistoryklineRealtimeData);
    }

    /**
     * 修改实时获取历史K线
     * 
     * @param spotHistoryklineRealtimeData 实时获取历史K线
     * @return 结果
     */
    @Override
    public int updateSpotHistoryklineRealtimeData(SpotHistoryklineRealtimeData spotHistoryklineRealtimeData)
    {
        return spotHistoryklineRealtimeDataMapper.updateSpotHistoryklineRealtimeData(spotHistoryklineRealtimeData);
    }

    /**
     * 批量删除实时获取历史K线
     * 
     * @param ids 需要删除的实时获取历史K线主键
     * @return 结果
     */
    @Override
    public int deleteSpotHistoryklineRealtimeDataByIds(Integer[] ids)
    {
        return spotHistoryklineRealtimeDataMapper.deleteSpotHistoryklineRealtimeDataByIds(ids);
    }

    /**
     * 删除实时获取历史K线信息
     * 
     * @param id 实时获取历史K线主键
     * @return 结果
     */
    @Override
    public int deleteSpotHistoryklineRealtimeDataById(Integer id)
    {
        return spotHistoryklineRealtimeDataMapper.deleteSpotHistoryklineRealtimeDataById(id);
    }

    @Override
    public List<SpotHistoryklineRealtimeDataVO> selectSpotAllData() {
        return spotHistoryklineRealtimeDataMapper.selectSpotAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return spotHistoryklineRealtimeDataMapper.queryCurryNumber(currencyPair);
    }
}
